<?php
require "auto-tag-slug-master/class.Chinese.php";

function iconvKey($wd)
{
    if (empty($wd)) return '';
    if ( is_dir( dirname(__FILE__) . '/auto-tag-slug-master/config/') ) {
        $table = dirname(__FILE__) . '/auto-tag-slug-master/config/';
    }
    $chs = new Chinese('UTF8', 'GB2312', $wd, $table );
    $str = $chs -> ConvertIT();
    # GB2312
    $chs = new Chinese( 'GB2312', 'BIG5', $str, $table );
    $str = $chs -> ConvertIT();
    # BIG5
    $chs = new Chinese( 'BIG5', 'UTF8', $str, $table );
    return $chs -> ConvertIT();
}

echo iconvKey($_POST['jianti']);
